package com.hxkj.dao.impl;

import com.hxkj.dao.RankingManagementDao;
import com.hxkj.domain.po.RankingManagement;
import com.hxkj.mapper.RankingManagementMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;


/**
* 数据操作实现
*
* @author: chenwei
* @version: 1.0
* @datetime: 2018-06-28 20:06:30
*
*/
@Service("rankingManagementDao")
public class RankingManagementDaoImpl implements RankingManagementDao {

    @Resource
    private RankingManagementMapper rankingManagementMapper;

    @Override
    public RankingManagement get(Long rankingId) {
        return rankingManagementMapper.selectByPrimaryKey(rankingId);
    }

    @Override
    public List<RankingManagement> get(RankingManagement rankingManagement) {
        return rankingManagementMapper.select(rankingManagement);
    }

    @Override
    public int delete(Long rankingId) {
        return rankingManagementMapper.deleteByPrimaryKey(rankingId);
    }

    @Override
    public int delete(RankingManagement rankingManagement) {
        return rankingManagementMapper.delete(rankingManagement);
    }

    @Override
    public int save(RankingManagement rankingManagement) {
        return rankingManagementMapper.insert(rankingManagement);
    }

    @Override
    public int update(RankingManagement rankingManagement) {
        return rankingManagementMapper.update(rankingManagement);
    }
}
